Python v3.7 HowTos:
Calculate the discriminant value
Find the smallest multiple of the first N numbers and factors
a = 7 num_bits = 0 while a: num_bits += a & 1 a = a >> 1 print(num_bits)
Output:
3